﻿<UserControl
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    Tag="Dr. WPF: DataTemplate with ItemsControl">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>        
        <ItemsControl>
            <sys:Int32>30</sys:Int32>
            <sys:DateTime>12/16/1970</sys:DateTime>
            <sys:Boolean>True</sys:Boolean>
            <sys:Boolean>False</sys:Boolean>
            <sys:String>Foo</sys:String>
        </ItemsControl>
        <ItemsControl Grid.Column="1">
            <ItemsControl.Resources>
                <DataTemplate DataType="{x:Type sys:Boolean}">
                    <CheckBox IsChecked="{Binding Mode=OneWay}" />
                </DataTemplate>
            </ItemsControl.Resources>
            <sys:Int32>30</sys:Int32>
            <sys:DateTime>12/16/1970</sys:DateTime>
            <sys:Boolean>True</sys:Boolean>
            <sys:Boolean>False</sys:Boolean>
            <sys:String>Foo</sys:String>
        </ItemsControl>
    </Grid>
</UserControl>